﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QLNH.MyLayouts;

namespace QLNH.MyForms
{
    public partial class AdminStatistics : FormUC
    {
        public AdminStatistics(LayoutUC mainLayout)
        {
            InitializeComponent();
            _mainLayout = mainLayout;
            Formkey = FormKey.ADMIN_STATISTICS;
        }

        public override void Resize(Size size)
        {
            if (this.Size.Width < size.Width)
            {
                this.Location = new Point(size.Width / 2 - this.Size.Width / 2, size.Height / 2 - this.Size.Height / 2);
            }
            else
            {
                this.Location = new Point(0, 0);
            }
        }

        #region Control Events

        private void mbt_saleStatistic_Click(object sender, EventArgs e)
        {
            _mainLayout.SwitchForm(FormKey.ADMIN_SALE_STATISTIC);
        }

        private void mbt_favoriteFoodStatistic_Click(object sender, EventArgs e)
        {
            _mainLayout.SwitchForm(FormKey.ADMIN_FAVORITE_FOODS_STATISTIC);
        }

        #endregion
    }
}
